<p id="btn" (click)="close()">
    <!-- <i nz-icon nzType="left" nzTheme="outline"></i> -->
    <ion-icon name="arrow-back"></ion-icon>
    报警信息列表
</p>

<p style="    padding-left: 24px;
          font-size: 16px;
          border-left: solid #0987fe;">基本信息</p>
<!-- 
<form nz-form>
    <nz-form-item>
        <nz-form-label [nzSpan]="7" nzRequired>预警编号</nz-form-label>
        <nz-form-control [nzSpan]="12">
            <input nz-input name="code" [(ngModel)]="selectEditData[0].key" [disabled]="true" placeholder="请输入唯一编号" />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="7" nzRequired>预警名称</nz-form-label>
        <nz-form-control [nzSpan]="12">
            <input nz-input name="name" [(ngModel)]="selectEditData[0].name" [disabled]="option == 'preview'"
                placeholder="请输入预警名称" />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="7">属性名称</nz-form-label>
        <nz-form-control [nzSpan]="12">
            <input nz-input name="property" [(ngModel)]="selectEditData[0].strategy.attribute.name"
                [disabled]="option == 'preview'" placeholder="请输入预警名称" />
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="7">报警条件A</nz-form-label>
        <nz-form-control [nzSpan]="12">
            <nz-select name="conditiona" style="width: 150px;" [(ngModel)]="selectEditData[0].strategy.conditiona.key"
                [disabled]="option == 'preview'" nzAllowClear nzPlaceHolder="请选择">
                <nz-option nzValue=">" nzLabel="大于A"></nz-option>
                <nz-option nzValue=">=" nzLabel="大于等于A"></nz-option>
                <nz-option nzValue="<" nzLabel="小于A"></nz-option>
                <nz-option nzValue="<=" nzLabel="小于等于A"></nz-option>
                <nz-option nzValue="=" nzLabel="等于A"></nz-option>
                <nz-option nzValue="!=" nzLabel="不等于A"></nz-option>
            </nz-select>
            <nz-input-number style="width: 150px;" nz-input name="a"
                [(ngModel)]="selectEditData[0].strategy.conditiona.value" [disabled]="option == 'preview'"
                placeholder="请输入A"></nz-input-number>
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="7">报警条件B</nz-form-label>
        <nz-form-control [nzSpan]="12">
            <nz-select name="conditionb" style="width: 150px;" [(ngModel)]="selectEditData[0].strategy.conditionb.key"
                [disabled]="option == 'preview'" nzAllowClear nzPlaceHolder="请选择">
                <nz-option nzValue="<" nzLabel="小于B"></nz-option>
                <nz-option nzValue=">" nzLabel="大于B"></nz-option>
            </nz-select>
            <nz-input-number style="width: 150px;" nz-input name="b"
                [(ngModel)]="selectEditData[0].strategy.conditiona.value" [disabled]="option == 'preview'"
                placeholder="请输入B"></nz-input-number>
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="7">报警级别</nz-form-label>
        <nz-form-control [nzSpan]="12">
            <nz-select name="level" style="width: 150px;" [(ngModel)]="selectEditData[0].strategy.level"
                [disabled]="option == 'preview'" nzAllowClear nzPlaceHolder="请选择">
                <nz-option nzValue="0" nzLabel="提醒"></nz-option>
                <nz-option nzValue="1" nzLabel="警报"></nz-option>
                <nz-option nzValue="2" nzLabel="严重"></nz-option>
            </nz-select>
        </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label [nzSpan]="7">添加时间</nz-form-label>
        <nz-form-control [nzSpan]="12">
            <input nz-input name="name" [(ngModel)]="selectEditData[0].endtime " [disabled]="option == 'preview'"
                placeholder="请输入预警名称" />
        </nz-form-control>
    </nz-form-item>
</form> -->


<div class="am-list-body">
    <InputItem name="code" [(ngModel)]="selectEditData[0].key" [disabled]="true" [clear]="true"
        [placeholder]="'请输入唯一编号'" [moneyKeyboardAlign]="'left'" >预警编号
    </InputItem>
</div>
<div class="am-list-body">
    <InputItem name="name" [(ngModel)]="selectEditData[0].name" [clear]="true" [placeholder]="'请输入策略名称'"
        [moneyKeyboardAlign]="'left'" [disabled]="option == 'preview'" >预警名称
    </InputItem>
</div>
<div class="am-list-body">
        <InputItem name="property" [(ngModel)]="selectEditData[0].strategy.attribute.name" [clear]="true" [placeholder]="'请输入属性名称'"
            [moneyKeyboardAlign]="'left'" [disabled]="option == 'preview'" >属性名称
        </InputItem>
    </div>


<div class="am-list-body">
    <ion-item>
        <ion-label>报警条件A</ion-label>
        <ion-select style="display: -webkit-inline-box" placeholder="选择条件A" [disabled]="option == 'preview'"
            [(ngModel)]="selectEditData[0].strategy.conditiona.key" ok-text="确认" cancel-text="取消">
            <ion-select-option value=">">大于A</ion-select-option>
            <ion-select-option value=">=">大于等于A</ion-select-option>
            <ion-select-option value="<">小于A</ion-select-option>
            <ion-select-option value="<=">小于等于A</ion-select-option>
            <ion-select-option value="=">等于A</ion-select-option>
            <ion-select-option value="!=">不等于A</ion-select-option>
        </ion-select>
        <ion-input name="optionA" placeholder="A的值" style="text-align: right" [disabled]="option == 'preview'"
            [(ngModel)]="selectEditData[0].strategy.conditiona.value">
        </ion-input>
    </ion-item>
</div>
<!-- <InputItem style="width: 25%; display:inline-block;" [placeholder]="'A的值'"></InputItem> -->

<div class="am-list-body">
    <ion-item>
        <ion-label>报警条件B</ion-label>
        <ion-select style="display: -webkit-inline-box" placeholder="选择条件B" [disabled]="option == 'preview'"
            [(ngModel)]="selectEditData[0].strategy.conditionb.key" ok-text="确认" cancel-text="取消">
            <ion-select-option value="<">小于B</ion-select-option>
            <ion-select-option value=">">大于B</ion-select-option>
            <ion-select-option value="<=">小于等于B</ion-select-option>
            <ion-select-option value=">=">大于等于B</ion-select-option>
        </ion-select>
        <ion-input name="optionB" placeholder="B的值" style="text-align: right" [disabled]="option == 'preview'"
            [(ngModel)]="selectEditData[0].strategy.conditiona.value">
        </ion-input>
    </ion-item>
</div>
<!-- <InputItem style="width: 25%; display:inline-block;" [placeholder]="'B的值'"></InputItem> -->

<div class="am-list-body">
    <ion-item>
        <ion-label style="display: contents">报警级别</ion-label>
        <ion-select placeholder="选择级别" [(ngModel)]="selectEditData[0].strategy.level" ok-text="确认" cancel-text="取消" [disabled]="option == 'preview'">
            <ion-select-option value="0">提醒</ion-select-option>
            <ion-select-option value="1">警报</ion-select-option>
            <ion-select-option value="2">严重</ion-select-option>
        </ion-select>
    </ion-item>
</div>
<div class="am-list-body" id="ms">
    <InputItem [type]="'money'" [clear]="true" [placeholder]="'请输入毫秒值'" [focus]="numberFocus"
        [(ngModel)]="selectEditData[0].endtime " [disabled]="option == 'preview'">
        添加时间</InputItem>
</div>


<div style="margin: 24px;padding-left: 150px;" *ngIf="option == 'edit'">
    <button nz-button nzType="primary" style="margin-right: 8px;width: 95px" (click)="submit()">提交</button>
    <button nz-button style="width: 95px;margin-right: 8px">重置</button>
    <button nz-button style="width: 94px;" (click)="close()">取消</button>
</div>